package com.xcc.singletonpattern;

/**
 * @Description: Singleton
 * @Author xiechuang
 * @Date 2022/9/6
 */
public class Singleton3 {

    private static Singleton3 uniqueInstance = new Singleton3();

    private Singleton3() {}

    // version3："急切"创建实例
    public static synchronized Singleton3 getInstance2() {
        return uniqueInstance;
    }

}
